package main

import (
	"downloadmanager/internal/config"
	"downloadmanager/internal/i18n"
	"downloadmanager/internal/logger"
	"downloadmanager/internal/manager"
	"downloadmanager/internal/ui"

	"fyne.io/fyne/v2/app"
)

func main() {
	logger.Init()

	cfg := config.Load()
	// initialize i18n with configured language
	i18n.SetLanguage(cfg.Language)
	mgr := manager.NewManager(cfg)

	a := app.New()
	w := ui.NewMainWindow(a, mgr, cfg)
	w.ShowAndRun()
}
